<!DOCTYPE html>
    <html>
    <head lang="en">
        <meta charset="utf-8"/>
        <title>网站后台管理</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <link rel="stylesheet" href="${e.res('/css/bootstrap.min.css')}">
        <link rel="stylesheet" href="${e.res('/css/font-awesome.min.css')}">
        <link rel="stylesheet" href="${e.res('/css/ace.min.css')}">
        <script src="${e.res('/js/jquery-1.4.3.min.js')}"></script>
        <script src="${e.res('/js/errorHander.js')}"></script>
    </head>
    <body>
        <#include "/pages/moudle/BackHead.ftl">
        <div class="main-container" id="main-container">
            <div class="main-container-inner">
            <#include "/pages/moudle/BackSideBar.ftl">
            <@backSideBar chooseTag = '3' />
                <!--页面主体内容-->
                <div class="main-content">
                    <!-- 面包屑 -->
                    <div class="breadcrumbs" id="breadcrumbs">
                        <ul class="breadcrumb">
                            <li>
                                <i class="icon-home home-icon"></i>
                                <a href="#">首页</a>
                            </li>
                            <li>
                                <a href="/valuation/list">评价管理</a>
                            </li>
                            <li class="active">评价列表</li>
                        </ul>
                    </div>
                    <!-- 面包屑 -->
                    <div class="page-content">
                        <div class="page-header">
                            <h1>
                                评价列表
                                <small>
                                    <i class="icon-double-angle-right"></i>
                                    已上传的评价列表
                                </small>
                            </h1>
                        </div>
                        <!-- /.page-header -->
                        <div class="row">
                            <div class="col-xs-12">
                                <form class="form-horizontal" role="form">
                                    <#include "/pages/moudle/Pagination.ftl">
                                    <@pagination id="eval" method="/valuation/list" page=evaluates.pageInfo>
                                    <table id="sample-table-2" class="table table-striped table-bordered table-hover dataTable" aria-describedby="sample-table-2_info">
                                        <thead>
                                        <tr role="row">
                                            <th class="center sorting_disabled" style="width: 128px;">
                                                名称
                                            </th>
                                            <th class="center sorting_disabled" style="width: 138px;">
                                                描述
                                            </th>
                                            <th class="center sorting_disabled" style="width: 70px;">
                                                日期
                                            </th>
                                            <th class="center sorting_disabled" style="width: 62px;">
                                                操作
                                            </th>
                                        </tr>
                                        </thead>


                                        <tbody role="alert" aria-live="polite" aria-relevant="all">
                                        <#list evaluates.evalInfo as evalInfo>
                                        <tr class="odd">
                                            <td class=" ">${evalInfo.evalTitle}</td>
                                            <td class=" ">${evalInfo.evalDesc}</td>
                                            <td class=" ">${evalInfo.createTime}</td>
                                            <td class="center">
                                                <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
                                                    <a class="green" href="/valuation/edit?evalId=${evalInfo.evalId}" title="编辑">
                                                        <i class="icon-pencil bigger-130"></i>
                                                    </a>
                                                    <a id="del" class="red" href="javascript:void(0);" title="删除" eval-id="${evalInfo.evalId}">
                                                        <i class="icon-trash bigger-130"></i>
                                                    </a>
                                                </div>
                                            </td>
                                        </tr>
                                        </#list>
                                        </tbody>
                                    </table>
                                    </@pagination>
                                    <div class="clearfix form-actions">
                                        <div style="float:right;">
                                            <a href="/valuation/add" class="btn btn-info" type="button">
                                                <i class="icon-ok bigger-110"></i>
                                                新增评价
                                            </a>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <!--页面主题内容结束-->
            </div>
        </div>
    </body>
    <script>
        $("#del").die().live("click", function(){
            var evalId = $(this).attr("eval-id");
            if(evalId == "" || evalId == null){
                return;
            }
            $.ajax({
                url : '/valuation/del',
                type : 'POST',
                data : {evalId: evalId},
                dataType : 'json',
                success: function(res){
                    if(res.code == "OK"){
                        alert("删除成功");
                        window.location.href = "/valuation/list";
                    }else{
                        alert("删除失败");
                    }
                }
            });
            
        });
    </script>
</html>